package org.lex.swt.app;

import java.util.HashMap;
import java.util.Map;

public class ActionService {
	private Map<Object, ActionMap> map = new HashMap<Object, ActionMap>();
	private ActionMap rootMap = new ActionMap();

	public ActionMap getActionMap() {
		return rootMap;
	}

	public synchronized ActionMap getActionMap(Object key) {
		ActionMap am = map.get(key);
		if (null == am) {
			am = new ActionMap();
			map.put(key, am);
		}
		return am;
	}
}
